package com.ys.nms.module.business.dal.mysql.customOid;

import java.util.*;

import com.ys.nms.framework.common.pojo.PageResult;
import com.ys.nms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ys.nms.framework.mybatis.core.mapper.BaseMapperX;
import com.ys.nms.module.business.dal.dataobject.customOid.CustomOidDO;
import org.apache.ibatis.annotations.Mapper;
import com.ys.nms.module.business.controller.admin.customOid.vo.*;

/**
 * 自定义OID Mapper
 *
 * @author ZZY
 */
@Mapper
public interface CustomOidMapper extends BaseMapperX<CustomOidDO> {

    default PageResult<CustomOidDO> selectPage(CustomOidPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomOidDO>()
                .eqIfPresent(CustomOidDO::getCustomoidId, reqVO.getCustomoidId())
                .eqIfPresent(CustomOidDO::getDeviceId, reqVO.getDeviceId())
                .eqIfPresent(CustomOidDO::getCustomoidDeleted, reqVO.getCustomoidDeleted())
                .eqIfPresent(CustomOidDO::getCustomoidOid, reqVO.getCustomoidOid())
                .orderByDesc(CustomOidDO::getCustomoidId));
    }

}